<script>
	import updateManager from './utils/updateManager.js';
	import system from './utils/system';
	export default {
		globalData: {
			// 分类页一级分类ID
			activeId: 1
		},
		onLaunch: function() {
			system.attachInfo();
			let _this = this;
			wx.login({
				success: async function(res) {
					if (res.errMsg == "login:ok") {
						let result = await _this.$api.getOpenId({
							code: res.code
						});
						if (result.message === 'success') {
							wx.setStorageSync('userInfo', result.data);
						} else wx.ShowToastNone(result.message)
					}
				},
			})
		},
		onShow: function() {
			updateManager(); //版本检测更新

		},
		onHide: function() {}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	@import "./utils/iconfont.css";
	@import "./utils/common.scss";
</style>